package com.zzyl.nursing.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zzyl.common.core.page.TableDataInfo;
import com.zzyl.nursing.domain.Reservation;
import com.zzyl.nursing.dto.ReservationDto;
import com.zzyl.nursing.vo.TimeCountVo;

import java.time.LocalDateTime;
import java.util.List;

public interface IMemberReservationService extends IService<Reservation> {
    /**
     * 查询用户在指定时间段内取消的预约数量
     * @param userId
     * @param startTime
     * @param endTime

     * @return
     */
    int countCancelledByUserAndTime(Long userId, LocalDateTime startTime, LocalDateTime endTime);

    /**
     * 查询指定日期各时间段剩余预约次数
     * @param date 日期时间戳
     * @return 各时间段剩余预约次数列表
     */
    List<TimeCountVo> countRemainingByTime(long date);

    /**
     * 添加预约信息
     * @param reservationDto
     */
    void insertReservation(ReservationDto reservationDto);

    /**
     * 查询预约信息列表
     * @param reservation
     * @return
     */
    List<Reservation> selectReservationList(Reservation reservation);
}
